(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
a(C(x1, x2), y, z) → C(a(x1, y, z), a(x2, y, y))
a(Z, y, z) → Z
eqZList(C(x1, x2), C(y1, y2)) → and(eqZList(x1, y1), eqZList(x2, y2))
eqZList(C(x1, x2), Z) → False
eqZList(Z, C(y1, y2)) → False
eqZList(Z, Z) → True
second(C(x1, x2)) → x2
first(C(x1, x2)) → x1
The (relative) TRS S consists of the following rules:
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
a(C(x1, x2), y, z) → C(a(x1, y, z), a(x2, y, y))
a(Z, y, z) → Z
eqZList(C(x1, x2), C(y1, y2)) → and(eqZList(x1, y1), eqZList(x2, y2))
eqZList(C(x1, x2), Z) → False
eqZList(Z, C(y1, y2)) → False
eqZList(Z, Z) → True
second(C(x1, x2)) → x2
first(C(x1, x2)) → x1
The (relative) TRS S consists of the following rules:
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Rewrite Strategy: INNERMOST
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
Innermost TRS:
Rules:
a(C(x1, x2), y, z) → C(a(x1, y, z), a(x2, y, y))
a(Z, y, z) → Z
eqZList(C(x1, x2), C(y1, y2)) → and(eqZList(x1, y1), eqZList(x2, y2))
eqZList(C(x1, x2), Z) → False
eqZList(Z, C(y1, y2)) → False
eqZList(Z, Z) → True
second(C(x1, x2)) → x2
first(C(x1, x2)) → x1
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Types:
a :: C:Z → a → a → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
hole_C:Z1_0 :: C:Z
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:Z4_0 :: Nat → C:Z
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
a, eqZList
(6) Obligation:
Innermost TRS:
Rules:
a(
C(
x1,
x2),
y,
z) →
C(
a(
x1,
y,
z),
a(
x2,
y,
y))
a(
Z,
y,
z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
a :: C:Z → a → a → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
hole_C:Z1_0 :: C:Z
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:Z4_0 :: Nat → C:Z
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
The following defined symbols remain to be analysed:
a, eqZList
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
a(
gen_C:Z4_0(
n6_0),
hole_a2_0,
hole_a2_0) →
gen_C:Z4_0(
n6_0), rt ∈ Ω(1 + n6
0)
Induction Base:
a(gen_C:Z4_0(0), hole_a2_0, hole_a2_0) →RΩ(1)
Z
Induction Step:
a(gen_C:Z4_0(+(n6_0, 1)), hole_a2_0, hole_a2_0) →RΩ(1)
C(a(Z, hole_a2_0, hole_a2_0), a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0)) →RΩ(1)
C(Z, a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0)) →IH
C(Z, gen_C:Z4_0(c7_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
Innermost TRS:
Rules:
a(
C(
x1,
x2),
y,
z) →
C(
a(
x1,
y,
z),
a(
x2,
y,
y))
a(
Z,
y,
z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
a :: C:Z → a → a → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
hole_C:Z1_0 :: C:Z
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
The following defined symbols remain to be analysed:
eqZList
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
eqZList(
gen_C:Z4_0(
+(
1,
n203_0)),
gen_C:Z4_0(
n203_0)) →
False, rt ∈ Ω(1 + n203
0)
Induction Base:
eqZList(gen_C:Z4_0(+(1, 0)), gen_C:Z4_0(0)) →RΩ(1)
False
Induction Step:
eqZList(gen_C:Z4_0(+(1, +(n203_0, 1))), gen_C:Z4_0(+(n203_0, 1))) →RΩ(1)
and(eqZList(Z, Z), eqZList(gen_C:Z4_0(+(1, n203_0)), gen_C:Z4_0(n203_0))) →RΩ(1)
and(True, eqZList(gen_C:Z4_0(+(1, n203_0)), gen_C:Z4_0(n203_0))) →IH
and(True, False) →RΩ(0)
False
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
Innermost TRS:
Rules:
a(
C(
x1,
x2),
y,
z) →
C(
a(
x1,
y,
z),
a(
x2,
y,
y))
a(
Z,
y,
z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
a :: C:Z → a → a → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
hole_C:Z1_0 :: C:Z
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
eqZList(gen_C:Z4_0(+(1, n203_0)), gen_C:Z4_0(n203_0)) → False, rt ∈ Ω(1 + n2030)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
No more defined symbols left to analyse.
(13) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
(14) BOUNDS(n^1, INF)
(15) Obligation:
Innermost TRS:
Rules:
a(
C(
x1,
x2),
y,
z) →
C(
a(
x1,
y,
z),
a(
x2,
y,
y))
a(
Z,
y,
z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
a :: C:Z → a → a → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
hole_C:Z1_0 :: C:Z
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
eqZList(gen_C:Z4_0(+(1, n203_0)), gen_C:Z4_0(n203_0)) → False, rt ∈ Ω(1 + n2030)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
No more defined symbols left to analyse.
(16) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
(17) BOUNDS(n^1, INF)
(18) Obligation:
Innermost TRS:
Rules:
a(
C(
x1,
x2),
y,
z) →
C(
a(
x1,
y,
z),
a(
x2,
y,
y))
a(
Z,
y,
z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1and(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
a :: C:Z → a → a → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
hole_C:Z1_0 :: C:Z
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
a(gen_C:Z4_0(n6_0), hole_a2_0, hole_a2_0) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
(20) BOUNDS(n^1, INF)